inputs:RSILength(9);

//LONG
if  time >= 845 and time <= 1445
and RSI(close,RSILength) >= 85
then buy next bar at market;

if time = 1510 and marketposition = 1
then sell next bar at market;

//SHORT
if  time >= 845 and time <= 1445
and RSI(close,RSILength) <= 15
then sellshort next bar at market;

if time = 1510 and marketposition = -1
then buytocover next bar at market;
